cmake_minimum_required(VERSION 2.8)

set(math PROJECT_NAME)

# Compilation option
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wno-reorder -Wno-switch-enum")
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
endif ()

set (HEADERS
	aabb2.h
	math.h
	matrix2x2.h
	matrix3x3.h
	matrix4x4.h
	polygon2.h
	quaternion.h
	rotation2D.h
	scalar_funcs.h
	transform2.h
	triangle2.h
	utils.h
	vector2.h
	vector3.h
	vector4.h
	vector_funcs.h
	vector_reflection.h
	vector_types.h
	vectorX_base.h
	)

set(INLINES
	matrix3x3.inl
	)

set (SOURCES
	math.cpp
	vector_reflection.cpp
	)

source_group("" FILES ${HEADERS} ${SOURCES})

add_library(${LIB_NAME} STATIC ${HEADERS} ${INLINES} ${SOURCES})
